package com.btl.service.ai.support.memory;

import dev.langchain4j.store.memory.chat.ChatMemoryStore;
import dev.langchain4j.store.memory.chat.InMemoryChatMemoryStore;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

@Configuration
public class MemoryStoreProvider {

    @Bean
    public ChatMemoryStore inMemoryChatMemoryStore() {
        return new InMemoryChatMemoryStore();
    }

    @Bean
    public ChatMemoryStore redisChatMemoryStore(RedisTemplate<String, String> redisTemplate) {
        return new RedisChatMemoryStore(redisTemplate);
    }
}
